home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.unix.osf.osf1,comp.lang.c
- Subject: Re: printf-problem
- Date: Wed, 17 Jan 96 21:59:21 GMT
- Organization: none
- Distribution: world
- Message-ID: <821915961snz@genesis.demon.co.uk>
- References: <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de>
- wist@lam.mw.tu-muenchen.de "Henrik Wist" writes:
-
- >long int zahl; /* which is e.g. 10000500001 */
- >printf("%d\n",zahl); /* gives 1410565409, which is definitly wrong */
- >.
- >.
- >.
- >
- >Is that a problem of printf() or DG-UX or is it my problem that I don't know
- >the right conversion for printf(). Btw, printf("%u",zahl) didn't work either.
- >Any suggestions?
-
- RTFM. 'man printf' will almost certainly tell you that the conversion
- specifier for longs is %ld.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-